﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/Manage/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<QianBuo.Lottery.Web.Areas.Manage.Models.User.DisposeModel>" %>

<%@ Import Namespace="Code.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	处理提款申请
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<fieldset>
    <legend>处理提款申请</legend>
    <table class="table Dispose" width="100%">
        <tr><th align="left" colspan="6">&nbsp;&nbsp;&nbsp;&nbsp;基本信息</th></tr>
        <tr>
            <td align="right" width="100px">用户名:</td>
            <td><%=Model.User.LoginName %></td>
            <td align="right" width="100px">真实姓名:</td>
            <td><%=Model.User.RName %></td>
            <td align="right" width="100px">注册时间:</td>
            <td><%=Model.User.RegistTime %></td>
        </tr>
        <tr>
            <td align="right">用户类型:</td>
            <td><%=((UserType)Model.User.UserTye).GetName() %></td>
            <td align="right">QQ:</td>
            <td><%=Model.QQ %></td>
            <td align="right">电话:</td>
            <td><%=Model.Tel %></td>
        </tr>
        <tr>
            <td align="right">银行名称:</td>
            <td><%=Model.BankName %></td>
            <td align="right">银行卡号:</td>
            <td ><%=Model.BankCardNo %></td>
            <td align="right">开户地址:</td>
            <td><%=string.IsNullOrEmpty(Model.StreetName) ? "" : string.Format("{0}省{1}市{2}", Model.BankProviecs, Model.CityName, Model.StreetName) %></td>
        </tr>
        <tr>
            <td align="right">余额:</td>
            <td><%=Model.Balance %></td>
            <td align="right">网上支付账号:</td>
            <td colspan="3" align="left"><%=Model.PayAccount %></td>
            
        </tr>
        <tr><th align="left" colspan="6">&nbsp;&nbsp;&nbsp;&nbsp;提款信息</th></tr>
        <tr>
            <td align="right">提款金额:</td>
            <td><%=Model.TakeMoney %></td>
            <td align="right">收款方式:</td>
            <td><%=Model.Type.GetName() %></td>
            <td align="right">申请时间:</td>
            <td><%=Model.AddTime %></td>
        </tr>
        <tr>
            <td align="right">状态</td>
            <td><%=Model.State.GetName() %></td>
            <td align="right">收款账号</td>
            <td colspan="3" align="left"><%=Model.Account %></td>
        </tr>
        <tr>
            <td align="right">备注:</td>
            <td colspan='6' align="left"><%=string.IsNullOrEmpty(Model.Remark.Replace("&", "")) ? "" : Model.Remark.Replace("\r\n", "<br/>&nbsp;&nbsp;&nbsp;&nbsp;").Replace("&&", "<br/>管理员说:").Replace("&", Model.User.LoginName + "说:")%></td>
        </tr>
    </table>
    <p></p>
    <table class="table">
        <tr>
            <th align="left" colspan="2">&nbsp;&nbsp;&nbsp;&nbsp;备注:</th>
        </tr>
        <tr>
            <td align="left" valign="top" colspan="2"><textarea id="Remark" cols="100" rows="7"></textarea></td>
        </tr>
        <% if (Model.State == TakeMoneyState.UnDispose) %>
        <% { %>
        <tr>
            <td width="200px">处理方式:</td>
            <td align="left">
                <input id="rdoNo" type="radio" name='state' value="<%=(short)TakeMoneyState.Refuse %>"/>拒绝 
                <input id="rdoOk" type="radio" name="state" value="<%=(short)TakeMoneyState.Dispose%>"/>已转账
            </td>
        </tr>    
        <tr>
            <td colspan="2"><input id="btnOk"  type="button" value="确定" onclick="btn_Click(this)"/></td>
        </tr>
        <% } %>
        <% else %>
        <% { %>
        <tr>
            <td><%=Model.State.GetName() %></td>
            <td align="left">受理人:<%=Model.OperatorName %></td>
        </tr>
        <% } %>
    </table>
    <% if (Request["returnUrl"] != null)
       { %>
       <a class="a_blue" href='<%=Request["returnUrl"] %>'>返回>></a>
    <%} %>
</fieldset>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StyleAndScript" runat="server">
<style type="text/css">
    .Dispose tr{ margin-bottom:3px;}
</style>
<script type="text/javascript">
    function btn_Click(obj) {
        var value=rdoNo.value;
        var msg='';
        if(rdoNo.checked)
        {
            msg='您确定要距绝吗？';
        }else if(rdoOk.checked)
        {
            msg='您确定已在线下转账到当前申请用户的账号上了吗？';
            value=rdoOk.value;
        }
        else{
            alert('请选择操作');
            return ;
        }
        if(confirm(msg))
        {
            CreateWiteDiv(obj.offsetLeft + 'px', obj.offsetTop + 'px', "120px", "30px", '<%=Url.Content("~/Content/images/busy.gif") %>', '请稍等....');
            getJSON('<%=Url.Action("Dispose_Json", "User")%>', {id:<%=Model.ID %>,state:value,remark:Remark.value}, function (result) {
                if (result.count > 0) {
                    btnOk.disabled = "disabled";
                }
                if(result.msg!=null&&result.msg!=''){
                    alert(result.msg);
                }
                IsHideDiv = true;
            });
        }
    }
    $(document).ready(function(){
        var value='<%=(short)Model.State%>'
        if(value!='<%=(short)TakeMoneyState.UnDispose %>'){    
            btnOk.disabled = "disabled";
        }
    });
</script>
</asp:Content>
